﻿using System;
using System.ComponentModel;
using System.Net.Sockets;
using System.Net;

namespace BrainTechLLC
{
    #if NO_SILVERLIGHT
[Browsable(true)]
#endif
    public interface ICommunicationsProtocol
    {
        void CloseAndCleanup();
#if NO_SILVERLIGHT
        int Send(byte[] buffer, int offset, int size, SocketFlags flags, out SocketError errorCode);
#endif
        int Available { get; }
#if NO_SILVERLIGHT
        int Receive(byte[] buffer, int offset, int size, SocketFlags flags, out SocketError errorCode);
#endif
        void Close();
        bool Connect(string hostName, int portNumber, bool wantThrowException);
        Socket Socket { get; set; }
    }
}
